<template>
	<view class="main">
		<view class="hand">
			合作加盟
			<view></view>
		</view>
		<view class="show">
			<view :class="list.loshow=='0'?'logo':'logo1'">
				<image :src="list.logo"></image>
			</view>
			<view class="sone">
				{{list.content}}

			</view>
			
			<button class="stwo" type="default" open-type="contact">联系客服</button>

			<view class="sthree" @click="gobtn" v-show="!hehuo">
				进入管理端
			</view>
			<view class="sthree stwohehuo" @click="gobtnhehuo" v-show="hehuo">
				进入合伙人
			</view>
			<!-- <button class="stwo stwohehuo" type="default" @click="gobtnhehuo">进入合伙人</button> -->
		</view>
	</view>
</template>

<script>
	import tou_hand1 from '../../components/tou_hand2/tou_hand2.vue'
	export default {
		components: {
			tou_hand1
		},
		mounted() {
			//document.querySelector('body').setAttribute('style', 'background-color:#2A3034')
		},

		data() {
			return {
				type: '', //用户身份
				list: {},
				backid: '',
				hehuo:null
			}
		},
		onLoad(option) {
			this.backid = option.backid
		},
		onShow() {
			this.list = uni.getStorageSync('wechat_view');
			this.type = uni.getStorageSync('user').type
			this.carbtn()
		},
		methods: {
			carbtn(){
				
				this.$base.request('project/managerStat/isPartner', 'GET')
					.then(res => {
						if(res.data.code==200){
							this.hehuo=res.data.data
						}else{
							this.$toast.fail(res.data.msg)
						}
					})
					.catch(err => {
				
				})
			},
			gobtn() {
				uni.navigateTo({
					url: '/manager_pages/operator_management/operator_management?backid=0'
				});
			},
			gobtnhehuo() {
				console.log(123)
				uni.navigateTo({
					url: '/manager_pages/operator_management_new/operator_management_new?backid=0'
				});
			},
			//返回上一页
			blackbtn() {
				if (this.backid == 0) {
					uni.navigateBack()
				} else {
					uni.redirectTo({
						url: '../index/index'
					})
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.main {
		width: 100%;
		height: 100vh;
		overflow-x: hidden;
		background-color: #2A3034;

		.hand {
			text-size-adjust: 100% !important;
			-webkit-text-size-adjust: 100% !important;
			-moz-text-size-adjust: 100% !important;
			width: 100%;
			background-color: #2A3034;
			font-size: 30upx;
			padding: 20upx 36upx;
			font-family: PingFang SC Bold, PingFang SC Bold-Bold;
			font-weight: 700;
			text-align: center;
			color: #ffffff;
			//display: flex;
			box-sizing: border-box;
			justify-content: space-between;

			image {
				width: 22upx;
				height: 39upx;
				text-align: left;
			}
		}

		.show {
			width: 686upx;
			margin: 0 auto;
			background-color: #2A3034;
			margin-top: 184upx;
			padding-bottom: 62upx;

			.logo {
				width: 357upx;
				margin: 0 auto;

				image {
					width: 357upx;
					height: 160upx;
				}
			}

			.logo1 {
				width: 357upx;
				margin: 0 auto;

				image {
					width: 357upx;
					height: 357upx;
				}
			}

			.sone {
				width: 100%;
				box-sizing: border-box;
				font-size: 28upx;
				font-family: PingFang SC Medium, PingFang SC Medium-Medium;
				font-weight: 500;
				color: #fff;
				padding: 60upx 25upx 0upx 38upx;
				line-height: 50upx;

				.phone {
					border-bottom: 1upx solid #4B98ED;
					padding-bottom: 2upx;
					color: #4B98ED;
					box-sizing: border-box;
				}
			}

			.stwo {
				width: 635upx;
				border-radius: 50upx;
				margin: 0 auto;
				background-color: #8DC321;
				font-size: 32upx;
				font-family: PingFang SC Bold, PingFang SC Bold-Bold;
				font-weight: 700;
				text-align: center;
				color: #ffffff;
				margin-top: 68upx;
			}

			.sthree {
				width: 635upx;
				padding: 15upx 0;
				opacity: 0.53;
				border-radius: 30upx;
				background-color: #8DC321;
				margin: 0 auto;
				font-size: 28upx;
				font-family: PingFang SC Bold, PingFang SC Bold-Bold;
				font-weight: 700;
				text-align: center;
				color: #f5f5f5;
				margin-top: 62upx;
			}
		}

	}
	.main .show .stwohehuo{
		// background: red;
	}
</style>